var express = require("express");
var router = express.Router();
var orderModel = require("../../models/order/order_list");

router.delete("/", function (req, res, next) {
  console.log(req.query.id);
  let _id = req.query.id;
  orderModel.find({ _id }, function (err, docs) {
    if (!err) {
      docs[0].remove();
      res.json({
        data: null,
        msg: "删除成功！",
        code: 200,
      });
    }
  });
});

module.exports = router;
